package cn.wl.shiro.util;

import org.apache.shiro.authc.UsernamePasswordToken;

//重写Token
public class MyUsernamePasswordToken extends UsernamePasswordToken {

    private String loginType;//是否是免密登录

    public String getLoginType() {
        return loginType;
    }

    public void setLoginType(String loginType) {
        this.loginType = loginType;
    }

    public MyUsernamePasswordToken(){
        super();
    }

    public MyUsernamePasswordToken(String username,String password,String loginType,
                                   Boolean isRemember ,String host){
        super(username,password,isRemember,host);
        this.loginType =loginType;
    }



    //免密登录
    public MyUsernamePasswordToken(String username){
        super(username,"",false,null);
        this.loginType = LoginType.NOPASSWORD;
    }

    public MyUsernamePasswordToken(String username,String password){
        super(username,password,false,null);
        this.loginType = LoginType.PASSWORD;
    }

}
